﻿CREATE TABLE [dbo].[WebApplication] (
    [WebApplicationID]            UNIQUEIDENTIFIER NOT NULL,
    [ServiceID]                   UNIQUEIDENTIFIER NOT NULL,
    [ApplicationPoolID]           UNIQUEIDENTIFIER NOT NULL,
    [NeedsUpgrade]                BIT              NULL,
    [NeedsUpgradeIncludeChildren] BIT              NULL,
    [DisplayName]                 VARCHAR (100)    NULL,
    CONSTRAINT [PK_WebApplication] PRIMARY KEY CLUSTERED ([WebApplicationID] ASC),
    CONSTRAINT [FK_WebApplication_ApplicationPool] FOREIGN KEY ([ApplicationPoolID]) REFERENCES [dbo].[ApplicationPool] ([ApplicationPoolID]),
    CONSTRAINT [FK_WebApplication_Service1] FOREIGN KEY ([ServiceID]) REFERENCES [dbo].[Service] ([ServiceID])
);

